package cn.test;

import cn.domain.User;
import cn.service.impl.UserServiceImpl;
import cn.web.servlet.UserListServlet;
import org.junit.Test;


public class FindBypassword {

    public static void main(String[] args) {
        UserServiceImpl userService = new UserServiceImpl();
        User user = new User();
        user.setUsername("ykkk");
        user.setPassword("123456");
        User user1 = userService.FindUserByUsernameAndPassword(user);
        System.out.println(user1);

    }
    @Test
    public static void sad(){
        UserServiceImpl userService1 = new UserServiceImpl();
        User user1=new User();
        user1.setAddress("123");
        user1.setAge(20);
        user1.setEmail("231");
        user1.setGender("男");
        user1.setName("ykerer");
        user1.setQq("852");
        userService1.addUser(user1);

    }
    @Test
    public static void update(){
        UserServiceImpl userService1 = new UserServiceImpl();
        User user1=new User();
        user1.setId(6);
        user1.setAddress("123");
        user1.setAge(20);
        user1.setEmail("231");
        user1.setGender("男");
        user1.setName("ykerer");
        user1.setQq("852");
        userService1.updateUser(user1);

    }

}
